#[doc = "Register `interrupt_status` reader"]
pub struct R(crate::R<INTERRUPT_STATUS_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<INTERRUPT_STATUS_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<INTERRUPT_STATUS_SPEC>> for R {
    fn from(reader: crate::R<INTERRUPT_STATUS_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Masked interrupt status of timer.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMER_INT_STATUS_A {
    #[doc = "0: The interrupt is invalid."]
    INVALID = 0,
    #[doc = "1: The interrupt is valid."]
    VALID = 1,
}
impl From<TIMER_INT_STATUS_A> for bool {
    #[inline(always)]
    fn from(variant: TIMER_INT_STATUS_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `timer_int_status` reader - Masked interrupt status of timer."]
pub struct TIMER_INT_STATUS_R(crate::FieldReader<bool, TIMER_INT_STATUS_A>);
impl TIMER_INT_STATUS_R {
    pub(crate) fn new(bits: bool) -> Self {
        TIMER_INT_STATUS_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TIMER_INT_STATUS_A {
        match self.bits {
            false => TIMER_INT_STATUS_A::INVALID,
            true => TIMER_INT_STATUS_A::VALID,
        }
    }
    #[doc = "Checks if the value of the field is `INVALID`"]
    #[inline(always)]
    pub fn is_invalid(&self) -> bool {
        **self == TIMER_INT_STATUS_A::INVALID
    }
    #[doc = "Checks if the value of the field is `VALID`"]
    #[inline(always)]
    pub fn is_valid(&self) -> bool {
        **self == TIMER_INT_STATUS_A::VALID
    }
}
impl core::ops::Deref for TIMER_INT_STATUS_R {
    type Target = crate::FieldReader<bool, TIMER_INT_STATUS_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl R {
    #[doc = "Bit 0 - Masked interrupt status of timer."]
    #[inline(always)]
    pub fn timer_int_status(&self) -> TIMER_INT_STATUS_R {
        TIMER_INT_STATUS_R::new((self.bits & 0x01) != 0)
    }
}
#[doc = "TIMER_INTSTATUS is the timer interrupt status register.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [interrupt_status](index.html) module"]
pub struct INTERRUPT_STATUS_SPEC;
impl crate::RegisterSpec for INTERRUPT_STATUS_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [interrupt_status::R](R) reader structure"]
impl crate::Readable for INTERRUPT_STATUS_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets interrupt_status to value 0"]
impl crate::Resettable for INTERRUPT_STATUS_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
